#ifndef __MTRIANGLE_HPP__
#define __MTRIANGLE_HPP__

#include "MVector2D.hpp"

class MTriangle
{
public:
	MTriangle() {}
	MTriangle(const MTriangle& triangle);
	MTriangle(MVector2D vA, MVector2D vB, MVector2D vC);

	const MVector2D&   getVertexA() const;
	const MVector2D&   getVertexB() const;
	const MVector2D&   getVertexC() const;
	MVector2D          getCenter() const;

	void  setVertexA(const MVector2D& vA);
	void  setVertexB(const MVector2D& vB);
	void  setVertexC(const MVector2D& vC);
	void  reset();


	//! Overloaded assignment operator.
	MTriangle& operator=(const MTriangle& triangle)
	{
		if(this != &triangle)
		{
			m_vertexA = triangle.getVertexA();
			m_vertexB = triangle.getVertexB();
			m_vertexC = triangle.getVertexC();
		}

		return *this;
	}

private:
	MVector2D  m_vertexA;
	MVector2D  m_vertexB;
	MVector2D  m_vertexC;
};

#endif //__MTRIANGLE_HPP__

//EOF
